package com.shitou.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shitou.dao.CommentDao;
import com.shitou.pojo.Comment;
import com.shitou.util.DateUtil;

@Service
@Transactional
public class CommentService {

	@Resource
	private CommentDao dao;
	
	public int save(Comment comment) {
		comment.setCreatedate(DateUtil.getNow());
		dao.save(comment);
		return comment.getId();
	}
}
